# Config file for llcomp

# Current work dir
import os
WORKDIR=os.environ['PYTHONPATH']

# Location of cuda files
CUDA_INSTALL_DIR="/usr/local/cuda/"

###############################################
#            Frontend variables               #
###############################################
LEX_OPTIMIZE=True
YACC_OPTIMIZE=True
YACC_DEBUG =False
GNU_SUPPORT=False
###############################################
#           Preprocessor variables            #
###############################################
SHOW_FILE_AFTER_PREPRO=False
COMMENT_INCLUDES = True
MULTIPLE_FILE_PREPRO=False
INSERT_LOCAL_INCLUDES=True
################################################

# Enable/Disable internal hacks (like overrides, macros or highly experimental features)
# Not recommended for sensitive people
INTERNAL_HACKS=False
# Generate Frangollo calls with extra debug information
FRANGOLLO_DEBUG=False

# Use the new JJ processor
MULTIPLE_FILE_PREPRO=False

# ACC directives should ignore scope and create the registersVars only for variables directly registered on this directive, and ignore the previous variables
IGNORE_SCOPE=False 

# Additional nvidia compiler options
nv_opts = ""
# List of kernel optimizations to apply, currently supported "invariant"
kernel_optimizations = []

# Import local settings from user
from config_local import *
CONFIG_NAME = 'config_local'

m = __import__ (CONFIG_NAME)
try:
    attrlist = m.__all__
except AttributeError:
    attrlist = dir (m)
for attr in attrlist:
    globals()[attr] = getattr (m, attr)

INSTALLED_BACKENDS = [ 'Cuda', 'DotBackend', 'C', 'MPI', 'Frangollo' ]


FRONTEND_DIR = WORKDIR + 'yacf/Frontend'
FRONTEND_MODULE = "yacf.Frontend"

# C includes for templates
# TODO: Automatically detect include dirs
INCLUDE_DIR = WORKDIR + '/Backends/Frangollo/Templates/include/'
# Fake stdlib
FAKE_LIBC = WORKDIR + '/Backends/Cuda/Templates/include/fake_libc_include'

# This variable is used by each driver to set the current used languages across all modules
CURRENT_LANGUAGES = ['C99', 'C']

PREPROCESSOR="gcc -E"

